package com.fingard.dsp.bank.reqrespobj.auth.detail;

import java.util.HashMap;

import com.fingard.xml.XmlTextWriter;

public class RetAtsAuthDetail {
	/** 响应码 */
	public String respCode;

	/** 响应信息 */
	public String respInfo;

	/** 鉴权流水号 */
	public String reqSeqID;

	/** 鉴权状态 (fail-失败 ,success-成功) */
	public String verifyState;
	
	/** 原始码 */
	public String originalCode;
	
	/** 原始信息 */
	public String originalInfo;
	
	/** 映射后的统一码 */
	public String unifiedCode;
	
	/** 映射后的统一信息 */
	public String unifiedInfo;
	
	/** 鉴权失败类型	 (1-客户账户类错误,2-系统类错误,3-渠道商类错误,4-其它)*/
	public String failType;

	public void writeToXml(XmlTextWriter retXmlWriter) {
		retXmlWriter.writeStartElement("DetailRecord");

		retXmlWriter.writeElementString("RespCode", respCode);
		retXmlWriter.writeElementString("RespInfo", respInfo);
		retXmlWriter.writeElementString("ReqSeqID", reqSeqID);
		retXmlWriter.writeElementString("OriginalCode", originalCode);
		retXmlWriter.writeElementString("OriginalInfo", originalInfo);
		retXmlWriter.writeElementString("UnifiedCode", unifiedCode);
		retXmlWriter.writeElementString("UnifiedInfo", unifiedInfo);
		retXmlWriter.writeElementString("VerifyState", verifyState);
		retXmlWriter.writeElementString("FailType", failType);
	}

	public HashMap<String, String> writeToHash() {
		HashMap<String, String> retHash = new HashMap<String, String>();

		retHash.put("RespCode", respCode);
		retHash.put("RespInfo", respInfo);
		retHash.put("RdSeq", reqSeqID);
		retHash.put("OriginalCode", originalCode);
		retHash.put("OriginalInfo", originalInfo);
		retHash.put("UnifiedCode", unifiedCode);
		retHash.put("UnifiedInfo", unifiedInfo);
		retHash.put("VerifyState", verifyState);
		retHash.put("FailType", failType);
		
		return retHash;
	}
}
